
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    (function(a){  //1.var a = 100
        // 预解析规则: var 和 function 声明的变量 和函数
        //2.var a; 仅仅提前声明 没有赋值
        /*
        3.声明式函数 会提升
        function a() {
            console.log(a);
        }
        */
        console.log(a); //打印函数a
        var a = 10;
        console.log(a); //10
        function a() {
            console.log(a);
        }
        a(); //a is not a function
        
        
    })(100);
    
    </script>
</body>
</html>